package tvv.levelup.controller;

import tvv.levelup.dao.EmployeeDao;
import tvv.levelup.dao.PlayerDao;
import tvv.levelup.model.*;
import tvv.levelup.util.HibernateUtil;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
 * Created by VLAD on 29.06.2014.
 */
public class Main
{
    public static  void main(String[] args)
    {

        EmployeeDao ed = new EmployeeDao();
        Address address1 = ed.saveAddress("Yahmayka");
//        Address address2 = ed.saveAddress("Argentina");
//

        Set<Certificate> cert1 = new HashSet<Certificate>();
        cert1.add(new Certificate("MCA"));
        cert1.add(new Certificate("MBA"));
        cert1.add(new Certificate("PMP"));
        Employee employee1 = ed.saveEmployee("Victoria", address1, cert1);
//        Employee employee2 = ed.saveEmployee("Dmitry", address1);

//        System.out.println(employee1);
        //System.out.println(employee2);
        System.out.println(ed.getAllEmployees());


        HibernateUtil.getSessionFactory().close();








    }
}
